package fly.text;

import fly.help.PrintSupport;

import java.text.MessageFormat;

public class MessageFormatDemo {

    public static void main(String[] args) {
        PrintSupport.sout("1");

        int fileCount = 1273;
        String diskName = "MyDisk";
        Object[] testArgs = {
                new Long(fileCount), diskName
        };
        MessageFormat form = new MessageFormat(
                "The disk \"{1}\" contains {0} file(s). "
        );
        System.out.println(form.format(testArgs));
    }
}
// The disk "MyDisk" contains 1,273 file(s).